package com.feeling.oafeeling.controller;

import com.feeling.oafeeling.common.pojo.AjaxResult;
import com.feeling.oafeeling.pojo.Menu;
import com.feeling.oafeeling.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    private ISysMenuService menuService;

    @PostMapping("/allMenu")
    public AjaxResult queryAllMenu(){
        List<Menu> menus = menuService.queryAllMenu();
        return AjaxResult.success("查询成功",menus);
    }

    @PostMapping("/getName")
    public AjaxResult getName(){
        return AjaxResult.success();
    }
}
